package com.example.permissionservice.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user_roles")
@Schema(description = "用户角色绑定类")
public class UserRole {
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键id")
    private Long id;
    @Schema(description = "用户id")
    @TableField("user_id")
    private Long userId;
    @Schema(description = "角色id")
    @TableField("role_id")
    private int roleId;
}
